package com.jeff.tianti.cms.dao;

import com.jeff.tianti.common.dao.CustomBaseSqlDaoImpl;
import com.jeff.tianti.common.entity.PageModel;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.jeff.tianti.cms.entity.AdvertisingEncyclopediaType;
import com.jeff.tianti.cms.dto.AdvertisingEncyclopediaTypeQueryDTO;
/**
 * @author xujianfang
 * @desc AdvertisingEncyclopediaTypeDaoImpl类 
 * @date 2019-07-22
 */

public class AdvertisingEncyclopediaTypeDaoImpl extends CustomBaseSqlDaoImpl implements AdvertisingEncyclopediaTypeDaoCustom  {

    public PageModel<AdvertisingEncyclopediaType> queryAdvertisingEncyclopediaTypePage(AdvertisingEncyclopediaTypeQueryDTO advertisingEncyclopediaTypeQueryDTO){
         Map<String,Object> map = new HashMap<String,Object>();
         StringBuilder hql = new StringBuilder();
         hql.append("select t from AdvertisingEncyclopediaType t where t.deleteFlag = 0 order by t.createDate desc ");
         return this.queryForPageWithParams(hql.toString(),map,advertisingEncyclopediaTypeQueryDTO.getCurrentPage(),advertisingEncyclopediaTypeQueryDTO.getPageSize());
    }

    public List<AdvertisingEncyclopediaType> queryAdvertisingEncyclopediaTypeList(AdvertisingEncyclopediaTypeQueryDTO advertisingEncyclopediaTypeQueryDTO){
         Map<String,Object> map = new HashMap<String,Object>();
         StringBuilder hql = new StringBuilder();
         hql.append("select t from AdvertisingEncyclopediaType t where t.deleteFlag = 0");
         return this.queryByMapParams(hql.toString(),map);
    }


}